/**
 * 
 */
package com.dalonedrau.jogl.opengl.ui;

import com.dalonedrau.vectors.Vector2;
import com.dalonedrau.pool.PooledStringBuilder;
import com.dalonedrau.pool.StringBuilderPool;

/**
 * @author Donald
 *
 */
public class CharacterPosition {
	private char c = ' ';
	private Vector2[] positions;
	private int numPositions;
	public char getCharacter() {
		return c;
	}
	public Vector2 getPosition(final int index) throws Exception {
		if (index < 0
				|| index >= numPositions) {
			PooledStringBuilder sb =
					StringBuilderPool.getInstance().getStringBuilder();
			sb.append("ERROR!  CharacterPosition.getPosition() - ");
			sb.append("invalid index number ");
			sb.append(index);
			Exception ex = new Exception(sb.toString());
			sb.returnToPool();
			throw ex;
		}
		return positions[index];
	}
}
